﻿var onAjaxPostBack = false;

function UpdatePanel_BeginRequest( sender, args )
{
    onAjaxPostBack = true;
}

function UpdatePanel_PageLoaded( sender, args )
{
    if( validationRuleSet && onAjaxPostBack )
    {
        validationRuleSet.ReSubscribe();
        validationRuleSet.Execute();
    }
    onAjaxPostBack = false;
}

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest( UpdatePanel_BeginRequest );
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded( UpdatePanel_PageLoaded );
